<?php

namespace App\Models;

use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;
use \Illuminate\Auth\Authenticatable;

class User extends Model implements \Illuminate\Contracts\Auth\Authenticatable
{
    use HasFactory;
    use Authenticatable;
    
    protected $table = 'user';

    public $timestamps = false;

    protected $primaryKey = 'id';

    protected $guarded = [];

    // 角色
    public function role() {
    	return $this->hasOne('App\Models\Role','id','role_id');
    }
}
